package com.example.seckillservice2.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author smc
* @description 针对表【goods】的数据库操作Mapper
* @createDate 2023-12-20 14:59:01
* @Entity com.example.seckillservice2.mapper.Goods
*/
@Mapper
public interface GoodsMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Goods record);

    int insertSelective(Goods record);

    Goods selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Goods record);

    int updateByPrimaryKey(Goods record);

    @Select("""
        select * from goods;
    """)
    @ResultType(Goods.class)
    List<Goods> selectAll();

}
